package com.example.viewtest;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.example.viewtest.animate_7.RotationAnimateView;

public class MainActivity extends AppCompatActivity {

    private RotationAnimateView cView;
    private float value = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        cView = findViewById(R.id.text);

     /*   final MaterialEditText editText = findViewById(R.id.MaterialEditText);
        editText.setOnKeyListener(new View.OnKeyListener() {
            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {
                if (keyCode == KeyEvent.KEYCODE_ENTER){
                    editText.setErrorText("回车");
                    return true;
                }
                return false;
            }
        });
        editText.setRightImgClickListener(new MaterialEditText.OnRightImgClickListener() {
            @Override
            public void onRightImgClick() {
                editText.setText("");
                editText.clearError();
            }
        });*/
    }

    public void buttonClick(View view) {
        if (cView != null) {
         //   cView.setValue(++value);
            cView.startAnimation();
        }
    }
}
